package com.yun.zf.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yun.zf.common.admin.model.pact.PactPersonMo;
import com.yun.zf.common.app.domain.ZfOwnerCertificate;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 业主证件信息表 Mapper 接口
 * </p>
 *
 * @author cj
 * @since 2021-03-05
 */
@Mapper
public interface ZfOwnerCertificateMapper extends BaseMapper<ZfOwnerCertificate> {

    @Select("<script>" +
            " SELECT oc.type,oc.certificate_type cardType ,oc.citizenship,oc.owner_name name,oc.owner_card_no cardNo,oc.iphone,oc.email ,oc.sex ,oc.birthday  from zf_owner_certificate oc WHERE oc.basic_id=#{basicId} and oc.city_code=#{cityCode} and oc.province_code=#{provinceCode} " +
            "</script>")
    public List<PactPersonMo> getPactPerson(Long basicId, Long provinceCode, Long cityCode);
}
